package cn.tedu.boot1003.controller;


import cn.tedu.boot1003.mapper.ClassMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/class")
public class ClassController {

    @Autowired
    ClassMapper mapper;

    @RequestMapping("insert")
    public void insert(@RequestBody Class c){
        mapper.insert(c);
    }

    @RequestMapping("/select")
    public List<Class> select(){
        return mapper.select();
    }
}
